Optimal. Leaf size=42 \[ \frac {d^2 x}{b}+\frac {c^2 \log (x)}{a}-\frac {(b c-a d)^2 \log (a+b x)}{a b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {84}
\begin {gather*} -\frac {(b c-a d)^2 \log (a+b x)}{a b^2}+\frac {c^2 \log (x)}{a}+\frac {d^2 x}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 84
Rubi steps
\begin {align*} \int \frac {(c+d x)^2}{x (a+b x)} \, dx &=\int \left (\frac {d^2}{b}+\frac {c^2}{a x}-\frac {(-b c+a d)^2}{a b (a+b x)}\right ) \, dx\\ &=\frac {d^2 x}{b}+\frac {c^2 \log (x)}{a}-\frac {(b c-a d)^2 \log (a+b x)}{a b^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 42, normalized size = 1.00 \begin {gather*} \frac {a b d^2 x+b^2 c^2 \log (x)-(b c-a d)^2 \log (a+b x)}{a b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 55, normalized size = 1.31
method | result | size |
norman | \(\frac {d^{2} x}{b}+\frac {c^{2} \ln \left (x \right )}{a}-\frac {\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \ln \left (b x +a \right )}{a \,b^{2}}\) | \(54\) |
default | \(\frac {d^{2} x}{b}+\frac {\left (-a^{2} d^{2}+2 a b c d -b^{2} c^{2}\right ) \ln \left (b x +a \right )}{b^{2} a}+\frac {c^{2} \ln \left (x \right )}{a}\) | \(55\) |
risch | \(\frac {d^{2} x}{b}+\frac {c^{2} \ln \left (-x \right )}{a}-\frac {a \ln \left (b x +a \right ) d^{2}}{b^{2}}+\frac {2 \ln \left (b x +a \right ) c d}{b}-\frac {\ln \left (b x +a \right ) c^{2}}{a}\) | \(63\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.39, size = 53, normalized size = 1.26 \begin {gather*} \frac {d^{2} x}{b} + \frac {c^{2} \log \left (x\right )}{a} - \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (b x + a\right )}{a b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.32, size = 53, normalized size = 1.26 \begin {gather*} \frac {a b d^{2} x + b^{2} c^{2} \log \left (x\right ) - {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (b x + a\right )}{a b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 73 vs.
\(2 (34) = 68\).
time = 0.45, size = 73, normalized size = 1.74 \begin {gather*} \frac {d^{2} x}{b} + \frac {c^{2} \log {\left (x \right )}}{a} - \frac {\left (a d - b c\right )^{2} \log {\left (x + \frac {a b c^{2} + \frac {a \left (a d - b c\right )^{2}}{b}}{a^{2} d^{2} - 2 a b c d + 2 b^{2} c^{2}} \right )}}{a b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.03, size = 55, normalized size = 1.31 \begin {gather*} \frac {d^{2} x}{b} + \frac {c^{2} \log \left ({\left | x \right |}\right )}{a} - \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left ({\left | b x + a \right |}\right )}{a b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.39, size = 49, normalized size = 1.17 \begin {gather*} \frac {d^2\,x}{b}-\ln \left (a+b\,x\right )\,\left (\frac {c^2}{a}+\frac {a\,d^2}{b^2}-\frac {2\,c\,d}{b}\right )+\frac {c^2\,\ln \left (x\right )}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________